import 'package:flutter/material.dart';
import 'package:wechat_decode/constants/ui_constants.dart';

class UnifyButton extends StatelessWidget {
  const UnifyButton({
    super.key,
    this.enabled = true,
    this.onPressed,
    required this.text,
  });

  final String text;

  final bool enabled;

  final VoidCallback? onPressed;

  @override
  Widget build(BuildContext context) {
    return FilledButton.tonal(
      onPressed: enabled ? onPressed : null,
      style: buttonStyle,
      child: Text(text),
    );
  }
}
